package com.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.beans.LogGroupInfo;
import com.beans.UserInfo;
import com.dao.HiveDao;
import com.dao.impl.HiveDaoImpl;

@WebServlet("/Hive_LogTable2Servlet")
public class Hive_LogTable2Servlet extends HttpServlet {
	private HiveDao hiveDao = new HiveDaoImpl();

	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		UserInfo user = (UserInfo) request.getSession().getAttribute("session_user");

		List<LogGroupInfo> logList = hiveDao.getLogList2(user.getUserName());

		request.setAttribute("logList", logList);
		request.getRequestDispatcher("/Hive/log-table2-result.jsp").forward(request, response);
	}
}